package net.maku.biz.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import net.maku.framework.common.utils.PageResult;
import net.maku.framework.common.utils.Result;
import net.maku.biz.convert.BizLegalAidConvert;
import net.maku.biz.entity.BizLegalAidEntity;
import net.maku.biz.service.BizLegalAidService;
import net.maku.biz.query.BizLegalAidQuery;
import net.maku.biz.vo.BizLegalAidVO;
import net.maku.framework.security.user.SecurityUser;
import net.maku.framework.security.user.UserDetail;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;
import java.util.List;

/**
* 法律援助
*
* @author 阿沐 babamu@126.com
* @since 1.0.0 2025-03-30
*/
@RestController
@RequestMapping("biz/biz_legal_aid")
@Tag(name="法律援助")
@AllArgsConstructor
public class BizLegalAidController {
    private final BizLegalAidService bizLegalAidService;


    @PostMapping("save")
    @Operation(summary = "保存")
    public Result<String> save(@RequestBody BizLegalAidVO vo){
        UserDetail user = SecurityUser.getUser();
        vo.setMemberId(user.getId());
        bizLegalAidService.save(vo);
        return Result.ok();
    }


}